<% include header.html %>
<content>
    <div class="container">
        <div class="leftwidth" id="section">
            <!--panel-->
            <% lists.forEach(function(list){ if(list.id == _id){ %>
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <div class="panel-title"><a href="/pages/<%= list.id %>"><%= list.title %></a></div>
                </div>
                <div class="panel-body">
                    <% list.content.forEach(function(item){ %>
                    <p><%= item.txt %></p>
                    <% if(item.img !== ''){ %>
                    <img src="/images/<%= item.img %>" class="img-responsive">
                    <% }}) %>
                </div>
            </div>
            <% }}) %>
        </div>
        <div class="rightwidth" id="slidebar">
            <div class="panel panel-success">
                <div class="panel-heading">
                    <div class="panel-title">关于XXX的博客</div>
                </div>
                <div class="panel-body">
                    XXX的博客，就是一个简单的博客
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="title">关键词搜索</div>
                </div>
                <div class="panel-body">
                    <form action="" class="form-inline">
                        <div class="form-group">
                            <input type="text" class="form-control">
                        </div>
                        <button type="submit" class="btn btn-primary">搜索</button>
                    </form>
                </div>
            </div>
            <div class="panel panel-danger">
                <div class="panel-heading">
                    <div class="title">最新文章</div>
                </div>
                <ul class="list-group">
                    <% lists.forEach(function(list){ %>            
                    <li class="list-group-item"><a href="/pages/<%= list.id %>"><%= list.title %></a></li>
                    <% }) %>
                </ul>
            </div>
        </div>
    </div>
</content>
<% include footer.html %>